const fileViewApi = process.env.FILE_VIEW_API
const variable = {
  state: {
    // 文件预览地址
    fileViewUrl: fileViewApi + '/onlinePreview?url=',
    //代表数量
    todoCount: 0,
    //流程环节选项卡权限
    flowTabPermission: [],
    //评审环节标记
    review: ''
  },
  mutations: {
    SET_TODO_COUNT: (state, number) => {
      state.todoCount = number
    },
    SET_TAB_PERMISSION: (state, flowTabPermission) => {
      state.flowTabPermission = flowTabPermission
    },
    SET_REVIEW: (state, review) => {
      state.review = review
    }
  },
  actions: {
    Todo({ commit }, number) {
      commit('SET_TODO_COUNT', number)
    },
    FlowTabPermission({ commit }, flowTabPermission) {
      commit('SET_TAB_PERMISSION', flowTabPermission)
    },
    Review({ commit }, review) {
      commit('SET_REVIEW', review)
    }
  }
}
export default variable
